using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using MobileWebsiteGenerator.Entities;

namespace MobileWebsiteGenerator.Mapping
{
	public class WebsiteMap : EntityTypeConfiguration<Website>
	{
		public WebsiteMap()
		{
			// Primary Key
			this.HasKey(t => t.web_id);

			// Properties
			// Table & Column Mappings
			this.ToTable("Websites");
			this.Property(t => t.web_id).HasColumnName("web_id");
			this.Property(t => t.web_url).HasColumnName("web_url");
			this.Property(t => t.IsPictureGallery).HasColumnName("IsPictureGallery");
			this.Property(t => t.IsContactusPage).HasColumnName("IsContactusPage");
            this.Property(t => t.visitorcount).HasColumnName("visitorcount");
            this.Property(t => t.videoURL).HasColumnName("videoURL");
		}
	}
}

